<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>clearConfig()</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Smarty 3 Manual">
<link rel="up" href="api.functions.html" title="Chapter 14. Smarty Class Methods">
<link rel="prev" href="api.clear.compiled.tpl.html" title="clearCompiledTemplate()">
<link rel="next" href="api.compile.all.config.html" title="compileAllConfig()">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">clearConfig()</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="api.clear.compiled.tpl.html">Prev</a> </td>
<th width="60%" align="center">Chapter 14. Smarty Class Methods</th>
<td width="20%" align="right"> <a accesskey="n" href="api.compile.all.config.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="refentry" title="clearConfig()">
<a name="api.clear.config"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2>Name</h2>
<p>clearConfig() — clears assigned config variables</p>
</div>
<div class="refsect1" title="Description">
<a name="id429488"></a><h2>Description</h2>
<code class="methodsynopsis"><span class="type">void </span><span class="methodname">clearConfig</span>(<span class="methodparam"><span class="type">string </span><span class="parameter">var</span></span>);</code><p>
   This clears all assigned
   <a class="link" href="language.config.variables.html" title="Variables loaded from config files">config variables</a>.
   If a variable name is
   supplied, only that variable is cleared.
  </p>
<div class="example">
<a name="id429367"></a><p class="title"><b>Example 14.13. clearConfig()</b></p>
<div class="example-contents"><pre class="programlisting">

&lt;?php
// clear all assigned config variables.
$smarty-&gt;clearConfig();

// clear one variable
$smarty-&gt;clearConfig('foobar');
?&gt;

   </pre></div>
</div>
<br class="example-break"><p>
  See also
  <a class="link" href="api.get.config.vars.html" title="getConfigVars()"><code class="varname">getConfigVars()</code></a>,
  <a class="link" href="language.config.variables.html" title="Variables loaded from config files"><code class="varname">config variables</code></a>,
  <a class="link" href="config.files.html" title="Chapter 9. Config Files"><code class="varname">config files</code></a>,
  <a class="link" href="language.function.config.load.html" title="{config_load}"><code class="varname">{config_load}</code></a>,
  <a class="link" href="api.config.load.html" title="configLoad()"><code class="varname">configLoad()</code></a>
  and
  <a class="link" href="api.clear.assign.html" title="clearAssign()"><code class="varname">clearAssign()</code></a>.
  </p>
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="api.clear.compiled.tpl.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="api.functions.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="api.compile.all.config.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">clearCompiledTemplate() </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> compileAllConfig()</td>
</tr>
</table>
</div>
</body>
</html>
